#ifndef _ACTION_ONLINEINFO_H
#define _ACTION_ONLINEINFO_H

#include <stdbool.h>

typedef enum {
    ACTION_FETCHED_SUCCESSFULLY,
    ACTION_PARSE_FAILURE,
    ACTION_FETCHING_FAILURE
} action_onlineinfo_status;

typedef enum {
    SUCCESS,
    FAILED,
    WAIT
} action_onlineinfo_return_status;

typedef struct {
    action_onlineinfo_status status;
    action_onlineinfo_return_status return_status;
    char* message;
    char* user_id;
    char* user_name;
    char* user_ip;
    char* user_mac;
    char* user_package;
    char* user_index;
} action_onlineinfo_result;

action_onlineinfo_result action_onlineinfo(
    const char* bind_interface,
    const char* portal_host,
    const char* user_index
);

#endif
